# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2024/3/31
desc: 
sample: 
"""
import pytest


@pytest.fixture(scope="session")
def example_fixture():
    print("Fixture setup")
    #查询
    #example = create_example_resource()
    yield 'test'  # 这里yield的值会被传给使用该fixture的测试函数  setup --teardown
    print("Fixture teardown")
    # cleanup_example_resource(example)

class TestLogin():
    @classmethod
    def setup_class(cls):
        #准备数据
        print("Class setup")
        # 初始化类级资源

    @classmethod
    def teardown_class(cls):
        #清洗数据
        print("Class teardown")
        # 清理类级资源

    def setup_method(self, method):
        print("Method setup")
        # 准备方法级资源

    def teardown_method(self, method):
        print("Method teardown")
        # 清理方法级资源

    def test_login1(self,example_fixture):
        print(example_fixture)
        pass

    def test_login2(self):
        pass

    def test_login3(self):
        pass